
CPP=main.cpp  singleconfig.cpp configureinfo.cpp 

FLAG= -c -g -fPIC -shared 

OBJ=singleconfig.o configureinfo.o


.PHONY:ALL
all:libreadconfig.so mytest

HEAD= -I.

#LIB= -L./ -llogger -lz

mytest: main.o 
	g++ $< -g  -Wl,-rpath,./ ${HEAD} -L . -lreadconfig -o $@
	rm *.o
	

	
libreadconfig.so:$(OBJ)
	g++ -g -fPIC -shared -lpthread  $(OBJ) -o $@  ${HEAD}

.cpp.o:
	g++ $(HEAD) $(FLAG) -o $@ $< 

install:
	cp libreadconfig.so ../../lib/
	mkdir -p ../../include/libreadconfig/
	cp configureinfo.h singleconfig.h ../../include/libreadconfig/
clean:
	rm libreadconfig.so mytest 
